/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "BarrelConditioning")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BarrelConditioning.findAll", query = "SELECT b FROM BarrelConditioning b"),
    @NamedQuery(name = "BarrelConditioning.findByBCId", query = "SELECT b FROM BarrelConditioning b WHERE b.bCId = :bCId"),
    @NamedQuery(name = "BarrelConditioning.findByBCOrigVol", query = "SELECT b FROM BarrelConditioning b WHERE b.bCOrigVol = :bCOrigVol"),
    @NamedQuery(name = "BarrelConditioning.findByBCVolLeft", query = "SELECT b FROM BarrelConditioning b WHERE b.bCVolLeft = :bCVolLeft"),
    @NamedQuery(name = "BarrelConditioning.findByBCPackaged", query = "SELECT b FROM BarrelConditioning b WHERE b.bCPackaged = :bCPackaged"),
    @NamedQuery(name = "BarrelConditioning.findByBCBatches", query = "SELECT b FROM BarrelConditioning b WHERE b.bCBatches = :bCBatches"),
    @NamedQuery(name = "BarrelConditioning.findByBCVesselID", query = "SELECT b FROM BarrelConditioning b WHERE b.bCVesselID = :bCVesselID"),
    @NamedQuery(name = "BarrelConditioning.findByBCDatePkg", query = "SELECT b FROM BarrelConditioning b WHERE b.bCDatePkg = :bCDatePkg"),
    @NamedQuery(name = "BarrelConditioning.findByBCFillDate", query = "SELECT b FROM BarrelConditioning b WHERE b.bCFillDate = :bCFillDate"),
    @NamedQuery(name = "BarrelConditioning.findUnfinished", query = "SELECT b FROM BarrelConditioning b WHERE b.bCPackaged = 'false'")})
public class BarrelConditioning implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "BCId")
    private Integer bCId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCOrigVol")
    private float bCOrigVol;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCVolLeft")
    private float bCVolLeft;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCPackaged")
    private boolean bCPackaged;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 250)
    @Column(name = "BCBatches")
    private String bCBatches;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCVesselID")
    private int bCVesselID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCDatePkg")
    @Temporal(TemporalType.DATE)
    private Date bCDatePkg;
    @Basic(optional = false)
    @NotNull
    @Column(name = "BCFillDate")
    @Temporal(TemporalType.DATE)
    private Date bCFillDate;

    public BarrelConditioning() {
    }

    public BarrelConditioning(Integer bCId) {
        this.bCId = bCId;
    }

    public BarrelConditioning(Integer bCId, float bCOrigVol, float bCVolLeft, boolean bCPackaged, String bCBatches, int bCVesselID, Date bCDatePkg, Date bCFillDate) {
        this.bCId = bCId;
        this.bCOrigVol = bCOrigVol;
        this.bCVolLeft = bCVolLeft;
        this.bCPackaged = bCPackaged;
        this.bCBatches = bCBatches;
        this.bCVesselID = bCVesselID;
        this.bCDatePkg = bCDatePkg;
        this.bCFillDate = bCFillDate;
    }

    public Integer getBCId() {
        return bCId;
    }

    public void setBCId(Integer bCId) {
        this.bCId = bCId;
    }

    public float getBCOrigVol() {
        return bCOrigVol;
    }

    public void setBCOrigVol(float bCOrigVol) {
        this.bCOrigVol = bCOrigVol;
    }

    public float getBCVolLeft() {
        return bCVolLeft;
    }

    public void setBCVolLeft(float bCVolLeft) {
        this.bCVolLeft = bCVolLeft;
    }

    public boolean getBCPackaged() {
        return bCPackaged;
    }

    public void setBCPackaged(boolean bCPackaged) {
        this.bCPackaged = bCPackaged;
    }

    public String getBCBatches() {
        return bCBatches;
    }

    public void setBCBatches(String bCBatches) {
        this.bCBatches = bCBatches;
    }

    public int getBCVesselID() {
        return bCVesselID;
    }

    public void setBCVesselID(int bCVesselID) {
        this.bCVesselID = bCVesselID;
    }

    public Date getBCDatePkg() {
        return bCDatePkg;
    }

    public void setBCDatePkg(Date bCDatePkg) {
        this.bCDatePkg = bCDatePkg;
    }

    public Date getBCFillDate() {
        return bCFillDate;
    }

    public void setBCFillDate(Date bCFillDate) {
        this.bCFillDate = bCFillDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (bCId != null ? bCId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BarrelConditioning)) {
            return false;
        }
        BarrelConditioning other = (BarrelConditioning) object;
        if ((this.bCId == null && other.bCId != null) || (this.bCId != null && !this.bCId.equals(other.bCId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.BarrelConditioning[ bCId=" + bCId + " ]";
    }
    
}
